package yl.hs.bmipfull.pojo.laboratory;

import lombok.Data;
import org.springframework.lang.Nullable;
import yl.hs.bmipfull.annotations.DBField;
import yl.hs.bmipfull.annotations.DBTable;
import yl.hs.bmipfull.pojo.BaseEntity;

import java.math.BigDecimal;

/**
 * 作用:  产品信息表实体类<br/>
 * 创建时间: 2021年05月22日 14时48分28秒 <br/>
 *
 * @author 吴高丰
 */
@Data
@DBTable(disName = "产品信息表", mapCode = "product_info")
public class ProductInfoEntity extends BaseEntity {

    /**
     * 主键
     */
    @Nullable
    private Long id;
    /**
     * 编号
     */
    @DBField(disName = "产品信息表编号", mapCode = "sn", isSerialNumber = true, isRequire = true, snPrefix = "CPXX")
    private String sn;
    private String productCateSN;
    private String billingNumber;
    /**
     * 产品名称
     */
    @DBField(disName = "产品名称")
    private String productName;
    /**
     * 产品名称拼音
     */
    private String productNamePY;
    /**
     * 折方系数(容重)
     */
    @DBField(disName = "容重")
    private BigDecimal density;
    /**
     * 产品规格
     */
    @DBField(disName = "产品规格")
    private String productSpec;
    /**
     * 产品标签
     */
    private String tags;
    /**
     * 组织代码
     */
    private String organizationCode;
    /**
     * 最大容重
     */
    @DBField(disName = "最大容重")
    private BigDecimal densityMax;
    /**
     * 最小容重
     */
    @DBField(disName = "最小容重")
    private BigDecimal densityMin;
    /**
     * 产品代码
     */
    @DBField(disName = "产品代码")
    private String productCode;
    /**
     * 状态
     *
     * @return
     */
    private short state;
    /**
     * 配比名称
     */
    @DBField(disName = "配比名称")
    private String pbName;
    /**
     * 配比编号
     */
    @DBField(disName = "配比编号")
    private String pbSn;
    /**
     * 不良品重量
     */
    @DBField(disName = "不良品重量")
    private BigDecimal defectiveWeight;
    /**
     * 不良品袋数
     */
    @DBField(disName = "不良品袋数")
    private BigDecimal defectiveQuantity;
    private BigDecimal totildefectiveWeight;
    private BigDecimal totildefectiveQuantity;
    public BigDecimal getDefectiveWeight() {
        return defectiveWeight;
    }

    public void setDefectiveWeight(BigDecimal defectiveWeight) {
        this.defectiveWeight = defectiveWeight;
    }

    public BigDecimal getDefectiveQuantity() {
        return defectiveQuantity;
    }

    public void setDefectiveQuantity(BigDecimal defectiveQuantity) {
        this.defectiveQuantity = defectiveQuantity;
    }

    public String getPbName() {
        return pbName;
    }

    public void setPbName(String pbName) {
        this.pbName = pbName;
    }

    public String getPbSn() {
        return pbSn;
    }

    public void setPbSn(String pbSn) {
        this.pbSn = pbSn;
    }

    public String getProductCateSN() {
        return productCateSN;
    }

    public void setProductCateSN(String productCateSN) {
        this.productCateSN = productCateSN;
    }

    public short getState() {
        return state;
    }

    public void setState(short state) {
        this.state = state;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSn() {
        return this.sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getProductName() {
        return this.productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductNamePY() {
        return this.productNamePY;
    }

    public void setProductNamePY(String productNamePY) {
        this.productNamePY = productNamePY;
    }

    public BigDecimal getDensity() {
        if (this.density == null) {
            return new BigDecimal(0);
        }
        return this.density;
    }

    public void setDensity(BigDecimal density) {

        this.density = density;
    }

    public String getProductSpec() {
        return this.productSpec;
    }

    public void setProductSpec(String productSpec) {
        this.productSpec = productSpec;
    }

    public String getTags() {
        if (this.tags == null) {
            return "";
        }
        return this.tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getOrganizationCode() {
        return this.organizationCode;
    }

    public void setOrganizationCode(String organizationCode) {
        this.organizationCode = organizationCode;
    }

    public BigDecimal getDensityMax() {
        if (this.densityMax == null) {
            return new BigDecimal(0);
        }
        return this.densityMax;
    }

    public void setDensityMax(BigDecimal densityMax) {
        this.densityMax = densityMax;
    }

    public BigDecimal getDensityMin() {
        if (this.densityMin == null) {
            return new BigDecimal(0);
        }
        return this.densityMin;
    }

    public void setDensityMin(BigDecimal densityMin) {

        this.densityMin = densityMin;
    }

    public String getBillingNumber() {
        return billingNumber;
    }

    public void setBillingNumber(String billingNumber) {
        this.billingNumber = billingNumber;
    }
}